<img src="http://stage.authenticavenue.com/img/email_logo.jpg" alt="Authentic Avenue logo" /><br><br><br>
<p style="font-size:16px;">Hello, <?php echo $userinfo['User']['first_name'] . ' ' . $userinfo['User']['last_name']; ?></p><br><br><br>
Thank you for your order from Authentic Avenue. Once your package ships we will send an email with a link to track your order.<br><br>
You can check the Order status of your order by <a href="http://stage.authenticavenue.com/carts/order_list">logging into your account</a><br><br>
Your order On Account confirmation is below. Thank you again for your business.<br><br><br>

<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="2" border="0" style="background-color:#E5ECF9">
                    <tbody>
                        <tr><td style="font-size:13px">&nbsp;Order date: <b>
                                    <?php                                    
                                       if($this->data['emailType']=="invoice")
                                           echo date("Y-m-d H:i:s", strtotime($invoice['Invoice']['pay_date'])); 
                                       else    
                                            echo date("Y-m-d H:i:s", strtotime($orders['Order']['add_date']));                                    
                                    ?>
                                </b><br>&nbsp;Paypal Transaction Id: <b><?php 
                                if($this->data['emailType']=="invoice")
                                    echo $invoice['Invoice']['transaction_id']; 
                                else                                        
                                    echo $orders['Order']['transaction_id']; 
                                ?></b>
                                <br>Order Status: <b><?php 
                                if($this->data['emailType']=="invoice")
                                    echo"Complete";
                                else
                                echo $orders['Order']['payment_status']; 
                                ?></b></td>
                            <td nowrap="" align="right" style="padding-right:15px"></td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" cellspacing="0" cellpadding="4" border="0" style="background-color:#FFFFFF;border:1px solid #E5ECF9">
                    <tbody>
                        <tr valign="top" style="margin-right:15px;margin-left:5px">
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;font-weight:bold;color:black;width:5%;text-align:center">&nbsp;<b>Qty</b>&nbsp;</td>
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;font-weight:bold;color:black;width:75%;text-align:left"><b>Item</b></td>
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;font-weight:bold;color:black;width:5%;text-align:right;padding-right:1em">&nbsp;&nbsp;<b>Price</b></td>
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;font-weight:bold;color:black;width:5%">Amount</td>
                        </tr>
                        <?php
                        if($this->data['emailType']=="invoice"){ ?>
                            <tr valign="top" style="margin-right:15px;margin-left:5px">
                                <td align="center" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%">&nbsp;1</td>
                                <td align="left" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:75%">
                                    <b><span style="font-weight:bold;color:black">Authentic Avenue fee</span></b>
                                </td>
                                <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%;text-align:right;padding-right:1em">$<?php echo $invoice['Invoice']['aa_fee']; ?></td>
                                <td align="right" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%">$<?php echo $invoice['Invoice']['aa_fee']; ?></td>
                            </tr>
                            <tr style="background-color:#E5ECF9">
                            <td style="font-weight:bold;font-size:14px;width:20%;text-align:right;vertical-align:text-top" colspan="3">Total:</td>
                            <td style="font-weight:bold;font-size:14px;width:5%;text-align:right;white-space:nowrap;padding-right:1em">$<?php echo $invoice['Invoice']['aa_fee']; ?></td>				
                        </tr>
                        <?php
                        }else{
                        foreach ($carts as $cart) {
                            ?>
                            <tr valign="top" style="margin-right:15px;margin-left:5px">
                                <td align="center" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%">&nbsp;<?php echo $cart['Cart']['quantity']; ?></td>
                                <td align="left" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:75%">
                                    <b><span style="font-weight:bold;color:black"><?php echo $cart['Product']['products_title']; ?></span></b>
                                </td>
                                <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%;text-align:right;padding-right:1em">$<?php echo $cart['Cart']['product_cost']; ?></td>
                                <td align="right" style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%">$<?php echo ($cart['Cart']['quantity']*$cart['Cart']['product_cost']); ?></td>
                            </tr>
                        <?php
                            }
                        ?>
                        <tr valign="top" style="margin-right:15px;margin-left:5px">
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:90%;text-align:right" colspan="3"><span>Shipping and handling</span> :</td>
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%;text-align:right;white-space:nowrap;padding-right:1em">$<?php echo $orders['Order']['shipping_cost']; ?></td>

                        </tr>
                        <tr valign="top" style="margin-right:15px;margin-left:5px">
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:90%;text-align:right" colspan="3"><span>Tax</span> :</td>
                            <td style="font-size:13px;border-bottom:1px solid #E5ECF9;width:5%;text-align:right;white-space:nowrap;padding-right:1em">$<?php echo $orders['Order']['sales_tax']; ?></td>

                        </tr>
                        <tr style="background-color:#E5ECF9">
                            <td style="font-weight:bold;font-size:14px;width:20%;text-align:right;vertical-align:text-top" colspan="3">Total:</td>
                            <td style="font-weight:bold;font-size:14px;width:5%;text-align:right;white-space:nowrap;padding-right:1em">$<?php echo ($orders['Order']['product_cost']+$orders['Order']['shipping_cost']+$orders['Order']['sales_tax']); ?></td>				
                        </tr>
                        <?php }?>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table> 
<br><br><br><br>
<p style="font-size:18px;">Kind Regards,<br>
    <span style="color:#1B1E51;">Authentic Avenue</span></p>